<template>
  <div class="nav_bar">
    <span><van-icon name="arrow-left" color="#fff" v-if="isBack" @click="$router.back()" /></span>
    <section>{{ title }}</section>
    <span></span>
  </div>
</template>
<script>
export default {
  props: {
    isBack: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: "千锋商城"
    }
  }
}
</script>
<style lang="scss" scoped>
.nav_bar {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: red;

  span {
    width: 60px;
    text-align: center;
  }

  section {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 16px;
  }
}
</style>